package com.sykj.util;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @program: spirngboot_Demo
 * @description:
 * @author: qiaoli
 * @create: 2020-07-11 09:45
 */
@Component
public class PointProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    public void  send(String message){
        String sendMsg = "点对点队列:" + message ;
        //指定队列
        this.rabbitTemplate.convertAndSend("test",sendMsg);
    }
}
